package com.theeviljames.seminar3;

public class GAAnalysis {

	public GAAnalysis(int popSize, int runs){
		for(int i = 0; i < runs; i++){
			GA ga = new GA(popSize,1000,true);
			boolean[] solution = ga.solve();
			if(solution != null){
				System.out.println("Pop>" + popSize + ", MaxGen>1000, Single Crossover>true, Generations>" + ga.getGeneration());
			}
			else{
				System.out.println("Pop>" + popSize + ", MaxGen>1000, Single Crossover>true, Generations>No solution found");
			}
		}
		for(int i = 0; i < runs; i++){
			GA ga = new GA(popSize,1000,false);
			boolean[] solution = ga.solve();
			if(solution != null){
				System.out.println("Pop>" + popSize + ", MaxGen>1000, Single Crossover>false, Generations>" + ga.getGeneration());
			}
			else{
				System.out.println("Pop>" + popSize + ", MaxGen>1000, Single Crossover>false, Generations>No solution found");
			}
		}
	}
	public static void main(String[] args) {
		GAAnalysis g = new GAAnalysis(100,100);
	}
}
